package ar.edu.unq.edp.futbol.mains;

import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

public class SharedSessionFactory {
	private static SessionFactory sessionFactory;
	
	private SharedSessionFactory() {}
	
	public static SessionFactory getInstance(){
		if (sessionFactory == null){
			sessionFactory = new Configuration().configure()
			.buildSessionFactory();
		}
		return sessionFactory;
	}
	
}
